<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Hello World!</title>
</head>
<body>
<h1>Hello World!</h1>
We are using node <script>document.write(process.versions.node)</script>,
Chrome <script>document.write(process.versions.chrome)</script>,
and Electron <script>document.write(process.versions.electron)</script>.

<button id="ta">test</button>

<script>
    const ipcRenderer = require('electron').ipcRenderer;
    //console.log(ipcRenderer.sendSync('synchronous-message', '1')); // prints "pong"

    ipcRenderer.on('asynchronous-reply', function(event, arg) {
        console.log(arg); // prints "pong"
    });
    ipcRenderer.send('asynchronous-message', {a:1,b:2});


    ipcRenderer.on('elelctron-sendMsg', function(event, arg) {
        console.log(arg); // prints "pong"
    });
    ipcRenderer.on('fn', function(event, arg) {
        console.log(arg); // prints "pong"
    });
</script>
</body>
</html>